{extend name="layout:base" /}
{block name="page_content"}
  <div class="row maintop">
    <div class="col-xs-12">
      <form name="form_search" class="form-search form-inline" method="get" action="{:url('index')}">
        <div class="form-group">
          <label>提交时间：</label>
          <input type="text" name="egt_time" id="egt_time" placeholder="开始日期" class="datepicker" value="{$param.egt_time|default='0'|format_show_time=###,'only_date'}">
          <label> -- </label>
          <input type="text" name="elt_time" id="elt_time" placeholder="结束日期" class="datepicker" value="{$param.elt_time|default='0'|format_show_time=###,'only_date'}">
        </div>
        <div class="form-group">
          <label>关键词：</label>
          <div class="input-group">
            <span class="input-group-addon">
              <i class="ace-icon fa fa-check"></i>
            </span>
            <input type="text" name="keyword" id="keyword" class="form-control" value="{$param.keyword|default=''}" placeholder="请输入关键词" />
            <span class="input-group-btn">
              <button type="submit" class="btn btn-purple btn-sm">
                <span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
                搜索
              </button>
            </span>
            </a>
          </div>
        </div>
        <div class="form-group">
          <a href="{:url('index')}" class="btn btn-sm btn-purple ml-10">
            <span class="ace-icon fa fa-globe icon-on-right bigger-110"></span>
            显示全部
          </a>
        </div>
        <?php if($auth->check('export')): ?>
          <div class="form-group">
            <a href="{:url('export', $param)}" target="_blank" class="btn btn-sm btn-pink ml-10">
              <i class="ace-icon fa fa-download bigger-110"></i>
              导出数据
            </a>
          </div>
        <?php endif; ?>
      </form>
    </div>
  </div>

  <div class="row">
    <div class="col-xs-12">
      <form method="post" action="{:url('resort')}" >
        <table class="table table-striped table-bordered table-hover" id="dynamic-table">
          <thead>
            <tr>
              <th>论文名称</th>
              <th>申报项目</th>
              <th>学校名称</th>
              <th>申报用户名</th>
              <th>申报用户手机</th>
              <th>注册用户名</th>
              <th>申报时间</th>
            </tr>
          </thead>
          <tbody>
            <?php $list = $res->all(); ?>
            {volist name="$list" id="vo"}
              <tr>
                <td>
                  <a href="{:url('read', ['id' => $vo['id']])}" target="_blank">
                    {$vo.title}
                  </a>
                </td>
                <td>
                  {$vo.article_title}
                </td>
                <td>
                  {$vo.college_name}
                </td>
                <td>
                  {$vo.user_name}
                </td>
                <td>
                  {$vo.mobile}
                </td>
                <td>
                  {$vo.user_login_name}
                </td>
                <td>
                  {$vo.create_time}
                </td>
              </tr>
            {/volist}
          </tbody>
        </table>
        <div class="row">
          <div class="col-xs-12">
            <?php echo($res->render()); ?>
          </div>
        </div>
      </form>
    </div>
  </div>
{/block}
{block name="page_js"}
  <script src="{$site_root}/static/ace1.4/assets/js/bootstrap-datepicker.min.js"></script>
  <script type="text/javascript">
    $(document).ready(function(){
      $('.datepicker').datepicker({
        minView: "month", //选择日期后，不会再跳转去选择时分秒
        format: "yyyy-mm-dd", //选择日期后，文本框显示的日期格式
        language: 'zh-CN', //汉化
        autoclose:true //选择日期后自动关闭
      });
    });
  </script>
{/block}